import 'jquery'
import 'babel-polyfill' // 兼容IE
import Vue from 'vue'
import store from '@/Store/index'
import index from './MainFrame.vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import TabRoute from '@/Router/TabRoute'
import RouterMethods from '@/Router/RouterMethods'
import CommonUtils from '@/Utils/common-utils.js'
import globalconstants from '@/Utils/globalconstants.js'
import Bus from '@/service/bus.js'
import '@progress/kendo-ui'
import '@progress/kendo-theme-bootstrap/dist/bootstrap-urban.css'
// import '@progress/kendo-theme-nouvelle/dist/all.css'

import '@progress/kendo-ui/js/messages/kendo.messages.zh-CN.min.js'
import '@progress/kendo-ui/js/cultures/kendo.culture.zh-CN.js'
import '@progress/kendo-ui/js/kendo.all.js'
// import '@progress/kendo-theme-default'
import {
  Validator,
  ValidatorInstaller
} from '@progress/kendo-validator-vue-wrapper'
import {
  Button,
  ButtonGroup,
  ToolBar,
  ToolBarItem,
  ButtonGroupButton,
  ButtonsInstaller
} from '@progress/kendo-buttons-vue-wrapper'

import {
  Menu,
  MenuItem,
  ContextMenu,
  PanelBar,
  PanelBarItem,
  TabStrip,
  Splitter,
  SplitterPane,
  LayoutInstaller
} from '@progress/kendo-layout-vue-wrapper'

import { NumericTextBox, InputsInstaller } from '@progress/kendo-inputs-vue-wrapper'

import {
  DataSource,
  HierarchicalDataSource,
  GanttDataSource,
  GanttDependencyDataSource,
  PivotDataSource,
  SchedulerDataSource,
  TreeListDataSource,
  DataSourceInstaller
} from '@progress/kendo-datasource-vue-wrapper'

import {
  Grid,
  GridColumn,
  GridInstaller
} from '@progress/kendo-grid-vue-wrapper'

import {
  DateinputsInstaller,
  Calendar,
  DateInput,
  DatePicker,
  DateRangePicker,
  DateTimePicker,
  TimePicker,
  MultiViewCalendar
} from '@progress/kendo-dateinputs-vue-wrapper'

import {
  Window,
  WindowInstaller
} from '@progress/kendo-window-vue-wrapper'
import {
  Notification,
  Tooltip,
  PopupsInstaller
} from '@progress/kendo-popups-vue-wrapper'

import { Dialog, DialogActionsBar } from '@progress/kendo-vue-dialogs'

import { TreeView, TreeViewItem } from '@progress/kendo-treeview-vue-wrapper'

import {
  AutoComplete,
  ComboBox,
  DropDownList,
  MultiSelect,
  DropdownsInstaller
} from '@progress/kendo-dropdowns-vue-wrapper'

import {
  DropDownTree,
  DropDownTreeInstaller
} from '@progress/kendo-dropdowntree-vue-wrapper'

import JSZip from 'jszip'
// 自定义组件 start
Vue.prototype.$kendoConfirm = ConfirmConstructor
Vue.prototype.$KendoNotify = NotificationInfo.install
import kendoForm from '@/Views/components/kendo-vue-component/kendoForm/index.vue'
import NotificationInfo from '@/Views/components/kendo-vue-component/notify/index'
import ConfirmConstructor from '@/Views/components/kendo-vue-component/confirm/index.js'
import KendoWindow from '@/Views/components/kendo-vue-component/window/index.js'// 引用全局组件
import KendoGridCmpt from '@/Views/components/kendo-vue-component/kendoGrid/index.js'// 引用全局组件
import KendoTreeCmpt from '@/Views/components/kendo-vue-component/kendoTreeView/index.js'// 引用全局组件
import KendoDiagramCmpt from '@/Views/components/kendo-vue-component/kendoDiagram/index.js'
import {
  post,
  fetch,
  patch,
  put,
  exportpost
} from '@/service/http'
import {
  delCookie,
  getCookie,
  setCookie
} from '@/service/util'
Vue.prototype.setCookie = setCookie
Vue.prototype.getCookie = getCookie
Vue.prototype.delCookie = delCookie
Vue.prototype.$post = post
Vue.prototype.$fetch = fetch
Vue.prototype.$put = put
Vue.prototype.$patch = patch
Vue.prototype.$exportpost = exportpost
// end
// 自定义组件 start
Vue.use(Window)
Vue.use(KendoDiagramCmpt)
Vue.use(KendoGridCmpt)
Vue.use(KendoTreeCmpt)
Vue.use(KendoWindow)
Vue.use(kendoForm)
// end
Vue.use(LayoutInstaller)
Vue.use(GridInstaller)
Vue.use(DataSource)
Vue.use(DataSourceInstaller)
Vue.use(ButtonsInstaller)
Vue.use(ValidatorInstaller)
Vue.use(InputsInstaller)
Vue.use(DateinputsInstaller)
Vue.use(WindowInstaller)
Vue.use(PopupsInstaller)
Vue.use(DropdownsInstaller)
Vue.use(DropDownTreeInstaller)
Vue.use(Dialog)
Vue.use(DialogActionsBar)
Vue.use(TreeView)
Vue.use(TreeViewItem)
Vue.use(TabRoute)
Vue.use(RouterMethods)
Vue.use(CommonUtils)
Vue.use(globalconstants)
Vue.use(Bus)
Vue.use(ElementUI, { size: 'medium' })
Vue.directive('title', {
  inserted: function(el, binding) {
    document.title = el.dataset.title
  }
})
// if (process.env.MOCK) { // 判断是否为mock模式

// }
// require('../Mock/index.js')
new Vue({
  el: '#app',
  store,
  render: v => v(index)
})
